#ifndef _GFW_URL 
#define _GFW_URL 

#ifdef __cplusplus
extern "C" {
#endif

typedef struct gfw_url {
    char *scheme;
    char *user;
    char *pass;
    char *host;
    unsigned short port;
    char *path;
    char *query;
    char *fragment;
} gfw_url;
gfw_url *gfw_url_parse(char const *str);
char *gfw_url_encode(char const *s);
char *gfw_url_decode(char const *s);

#ifdef __cplusplus
}
#endif

#endif /*_GFW_URL*/
